# 作   者：要努力，努力，再努力
# 开发日期：2022/4/22 16:44
def fun(a, b, c, d):
    print('a=', a)
    print('b=', b)
    print('c=', c)
    print('d=', d)


fun(10, 20, 30, 40)
fun(a=10, b=20, c=30, d=40)
fun(10, 20, c=30, d=40)


def fun2(a, b, *, c, d):  # * 之后的用关键字参数传递
    print('a=', a)
    print('b=', b)
    print('c=', c)
    print('d=', d)


# fun2(10, 20, 30, 40) # TypeError: fun2() takes 2 positional arguments but 4 were given
fun2(a=10, b=20, c=30, d=40)
fun2(10, 20, c=30, d=40)


def fun3(a, b, *, c, d, **args):
    pass


def fun4(*args, **args2):
    pass


def fun5(a, b=4, *args, **args2):
    pass
